package com.zb.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.List;

/**
 * @Author WEN
 * @Date 2023/7/20 0020
 **/
@Data
@ApiModel("角色实体封装")
public class RoleVo {
    @ApiModelProperty(value = "角色ID，新增不必传，修改时必传", example = "")
    private Long id;

    @NotBlank(message = "角色名称不能为空")
    @Length(max = 20, message = "角色名称字符长度限制20个以内")
    @ApiModelProperty(value = "角色名称", required = true)
    private String name;

    @NotBlank(message = "角色编码不能为空")
    @Pattern(regexp = "^\\w+$", message = "角色编码仅匹配英文字符！")
    @Length(max = 60, message = "角色编码字符长度限制60个以内")
    @ApiModelProperty(value = "角色编码", required = true)
    private String code;

    @NotNull(message = "角色状态不能为空")
    @ApiModelProperty(value = "角色状态：false-正常，true-禁用", required = true, example = "false")
    private Boolean status;

//    @ApiModelProperty(value = "权限ID集合")
//    List<Long> authorIds;

    @ApiModelProperty(value = "角色账号ID集合")
    List<Long> empIds;
}
